package com.my.test.thread.executors;

import java.util.concurrent.ExecutorService;

public class ThreadPoolDemo extends Thread{

    public static void main(String[] args) {
        ExecutorService ex = MyExecutors.newMyExecutors();
        for (int i = 0; i < 10; i++) {
            ex.execute(new ThreadPoolDemo());
        }
        ex.shutdown();
    }

    @Override
    public void run(){
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
